10 Compile and Run a Program with a Java IDE > 10.1 Eclipse 3.1.2 (with ME Plugin 1.2.3) > 10.1.1 Setup a New Project

10.1.1
Step 1:
Create new Java Project:
-
Select Eclipse menu File → New → Other…
-
Figure 22: Create new Eclipse project: Create a J2ME MIDP Midlet Suite
-
Figure 23: Create new Eclipse project: New J2ME Project
-
Figure 24: Create new Eclipse project: Midlet Suite Properties
-
Figure 25: Create new Eclipse project: work area with new created project
-
Figure 26: Create new Eclipse project: Create a J2ME Midlet
-
Figure 27: Create new Eclipse project: Create a New J2ME Midlet
Step 2:
Modify Java source file “printme.java” template:
Figure 28: Create new Eclipse project: Edit some Java commands
This application prints the given line via ASC1 (default setting). Please keep in mind to add “notifyDestroyed();” in destroyApp() method. Please refer to Chapter 6 “MIDlets” for more details about Midlet life cycles.
Step 3:
Configure Jad file:
-
Figure 29: Create new Eclipse project: Edit “deployed” path to Jar file
Step 4:
Create Jad and Jar file:
-
-
-
Step 5:
Download Jad and Jar file into the Flash File System of the module and start the Java appli­cation:
Manual download and start of Java application:
-
-
-
 
Automatic download and start of Java application using IDE:
-
Open the context menu of “printme.java” and select Emulated J2ME Midlet from item Run As.
-
The SMTK emulator downloads Jar and Jad file into the Flash File of the module (trans­mission via MES port that was selected during installation) and automatically starts the Java application.
-
Further information about importing an existing Java project into Eclipse based on the “Hello World” example is described in Section 11.3.2.7.